const mongoose = require("../../db/db");

/**
 * @description 管理系统 产品模型
 */
const Schema = mongoose.Schema({
    //产品id
    productId: {
        type: String,
        require: true
    },
    //skuAll
    skuAll: {
        type: String,
        require: true
    },
    sku: {
        type: String,
        require: true
    },
    //市场价
    price: {
        type: Number,
        default: 0
    },
    linePiece: {
        type: Number,
        default: 0
    },
    //库存数量
    stock: {
        type: Number,
        default: 0
    },
    imgUrl: {
        type: String,
        default: ""
    },
    //排序
    sort: {
        type: Number,
        default: 1
    },
    //状态
    status: {
        type: Number,
        default: 1
    }
}, {
    versionKey: false,
    timestamps: {
        createdAt: 'createDate',
        updatedAt: 'updateDate'
    }
})
const MAIN_TAB_BRAND = mongoose.model("product_skus_link", Schema);
module.exports = MAIN_TAB_BRAND;